﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AG.Editor.ModelUI.Windows
{
    /// <summary>
    /// 
    /// </summary>
    public partial class AGEImportPictureFilder : Form
    {
        public AGEImportPictureFilder()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 打开文件夹
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsbtn_opnfolder_Click(object sender, EventArgs e)
        {           
            if(folderopen.ShowDialog()== System.Windows.Forms.DialogResult.OK)
            {
                string folserSrc = folderopen.SelectedPath;
                //找到里面所有的图片
                DirectoryInfo dir = new DirectoryInfo(folserSrc);
                FileInfo[] picFiler = dir.GetFiles();

                for (int i = 0; i < 6; i++)
                {
                    GroupBox gb = new GroupBox();
                    gb.Name = "gb_" + i.ToString();
                    gb.Dock = DockStyle.Top;
                    gb.Height = 100;
                    this.Controls.Add(gb);

                    switch(i)
                    {
                        case 0:
                            gb.Text = "stand(站立)";
                            break;
                        case 1:
                            gb.Text = "move(移动)";
                            break;
                        case 2:
                            gb.Text = "attack(攻击)";
                            break;
                        case 3:
                            gb.Text = "underattack(被攻击)";
                            break;
                        case 4:
                            gb.Text = "defence(防御)";
                            break;
                        case 5:
                            gb.Text = "death(死亡)";
                            break;
                    }


                }




                foreach (FileInfo file in picFiler)
                {

                }
            }
        }
    }
}
